<template>
	<view class="content">
		<text class="success-icon yticon icon-xuanzhong2"></text>
		<text class="tit">支付成功</text>
		
		<view class="btn-group">
			<navigator :url="url" :open-type="openType" class="mix-btn hollow">返回</navigator>
		</view>
	</view>
</template>

<script>
	let _this;
	export default {
		data() {
			return {
				url:'/pages/index/index',
				openType:'switchTab'
			}
		},
		methods: {
			
		},
		onLoad() {
			_this = this;
			let redirect_pay = uni.getStorageSync('redirect_pay')
			if(''==redirect_pay){
				//跳转到首页
				return 
			}
			let {usercode,userxm} = uni.getStorageSync('user')
			
			let id = redirect_pay.id
			console.log(id,usercode)
			uni.removeStorageSync('redirect_pay')
			_this.openType='redirect'
			if(redirect_pay.type=='subjectCase'){
				//主观案例 detail
				_this.url=`/pages/subjectiveCase/detail?id=${id}`
			}else if(redirect_pay.type=='discussMark'){
				//论述高分 detail
				_this.url=`/pages/discussMark/detail?id=${id}`
			}else if(redirect_pay.type=='subjectLive'){
				//主观直播 detail
				_this.url=`/pages/subjectiveLive/detail?id=${id}`
			}else if(redirect_pay.type=='discussMarkList'){
				//论述高分list
				_this.url=`/pages/discussMark/index`
			}else if(redirect_pay.type=='subjectCaseList'){
				//主观直播list
				_this.url=`/pages/subjectiveCase/index`
			}
			
			
			
		},
	}
</script>

<style lang='scss'>
	/*
		全局公共样式和字体图标
	*/
	@font-face {
		font-family: yticon;
		font-weight: normal;
		font-style: normal;
		src: url('https://at.alicdn.com/t/font_1078604_w4kpxh0rafi.ttf') format('truetype');
	}
	
	.yticon {
		font-family: "yticon" !important;
		font-size: 16px;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}
	.icon-xuanzhong2:before {
		content: "\e62f";
	}
	.content{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.success-icon{
		font-size: 160upx;
		color: #fa436a;
		margin-top: 100upx;
	}
	.tit{
		font-size: 38upx;
		color: #303133;
	}
	.btn-group{
		padding-top: 100upx;
	}
	.mix-btn {
		margin-top: 30upx;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 600upx;
		height: 80upx;
		font-size: $font-lg;
		color: #fff;
		background-color: $base-color;
		border-radius: 10upx;
		&.hollow{
			background: #fff;
			color: #303133;
			border: 1px solid #ccc;
		}
	}
</style>
